package com.wl.dzt.sys.controller.result;

import java.util.HashMap;
import java.util.Map;


/**
 * @author wl_code@163.com
 * @version 1.0
 * @date 2018/7/5/005
 * @description 表单结果集
 * 执行表单动作后返回的结果参数
 */
public class FormResult {

    /**
     * 错误
     */
    private Map<String, String> errors = new HashMap<String, String>();
    /**
     * 字段
     */
    private String field;
    /**
     * 是否成功
     */
    private Boolean success;
    /**
     * 处理数据id
     */
    private String id;

    public FormResult() {
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Map<String, String> getErrors() {
        return errors;
    }

    public void setErrors(Map<String, String> errors) {
        this.errors = errors;
    }

    public void putError(String field, String msg) {
        this.errors.put(field, msg);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

}
